package com.turing.merchant.mapper;

import com.turing.merchant.entity.Good;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
* @author 28123
* @description 针对表【good(商品)】的数据库操作Mapper
* @createDate 2023-05-09 20:31:20
* @Entity com.turing.merchant.entity.Good
*/
public interface GoodMapper extends BaseMapper<Good> {

    List<Map> myGoodList(@Param("merchantId") String merchantId, @Param("gdId") String gdId, @Param("cgState") Integer cgState, @Param("gdCreateTime") String gdCreateTime, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize, @Param("username") String username);

    List<Map> goodList(@Param("merchantName") String merchantName, @Param("gdName") String gdName, @Param("priceType") Integer priceType, @Param("gdState") Integer gdState, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    List<Map> goodListByIds(@Param("ids") String[] ids);

    List<Map> goodListForPhone(@Param("categoryId") String categoryId, @Param("cdType") Integer cdType, @Param("longitude") String longitude, @Param("latitude") String latitude, @Param("orderType") Integer orderType, @Param("cityId") Integer cityId, @Param("orderState") String orderState, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize,@Param("cusId") String cusId);

    Map geGoodById(String id);

//    List<Good> autoAddMyMission(String cusId);


    Good selectMissionId(String gdId);

    Double selectDistance(@Param("longitude") String longitude, @Param("latitude") String latitude, @Param("merchantId") String merchantId);

    List<Map> selectDate(String gdId);

    Integer selectByGdIdCount(@Param("cusId") String cusId, @Param("gdId") String gdId);

    List<Map> selectByMission(@Param("id1") String id1);
}









